package com.spring.demo2.eg3;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @author vhans
 */
@ComponentScan
@Configuration
public class MainConfig {
    @Bean
    public User user1() {
        return new User();
    }

    @Bean
    public User user2() {
        return new User();
    }

    @Bean
    public String name() {
        return "学习Spring";
    }
}
